package edu.zhuku.myset;


public class Myset1 implements Comparable{
	public String userName;
	public int userAge;
	
	public Myset1(String userName,int userAge)
	{
		this.userName = userName;
		this.userAge = userAge;
	}
	
	public int compareTo(Object user1)
	{
		Myset1 user = ( Myset1 ) user1;
		int result = this.userAge - user.userAge;
		if(result > 0)
			return 1;
		else if (result == 0)
			return 0;
		else 
			return -1;
		
		
	}
}
